package add__4_memberinnerclass;

public class MemberInnerClass {
    //定义一个成员变量
    int m;
    public void test() {
        //局部变量
        final int num = 5;
        class inner{
            //成员变量
            int number;
            public void show() {
                //可以访问外部的所有成员，但访问外部的局部变量要求是被final修饰过的
                System.out.println(num + "," + number + "," + m);
            }
        }
        inner i = new inner();
        i.show();
    }
    public static void main(String[] args) {
        MemberInnerClass e = new MemberInnerClass();
        e.test();
    }
}
